package cn.jzq.kotoba.modules.principle.dip;

/**
 * @author jzq
 * @date 2019/1/24 17:10
 */
public class DriverConstructor implements IDriver{

    private ICar car;

    public DriverConstructor(ICar car) {
        this.car = car;
    }

    @Override
    public void drive(ICar car) {
        car.run();
    }

    public void drive() {
        this.car.run();
    }

    public static void main(String[] args) {
    }
}
